TARGETS = memallocator mem_default mem_fixsize mem_comm_fixsize
all: $(TARGETS)

CPPFLAGS = -std=c++11 -g
CPP = g++

%.o : %.cpp
	g++ $(CPPFLAGS) -c $< -o $@

memallocator: mem_base.o mem_allocator.o
	$(CPP) $^ -o memallocator

mem_default: mem_default.o
	$(CPP) $^ -o mem_default

mem_fixsize: mem_fixsize.o
	$(CPP) $^ -o mem_fixsize

mem_comm_fixsize: mem_comm_fixsize.o
	$(CPP) $^ -o mem_comm_fixsize

.PHONY: clean
clean:
	rm -rf $(TARGETS) *.o